package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IAfterSaleActivityModel;
import com.wgts.wgts.mvp.model.imp.AfterSaleActivityModel;
import com.wgts.wgts.mvp.presenter.IAfterSaleActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.AfterSaleActivityPresenter;
import com.wgts.wgts.mvp.view.IAfterSaleActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/1614:29
 *
 */
@Module
public class AfterSaleActivityModule {
    private IAfterSaleActivityView view;

    public AfterSaleActivityModule(IAfterSaleActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IAfterSaleActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IAfterSaleActivityModel provideModel(NetService netService){
        return new AfterSaleActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IAfterSaleActivityPresenter providePresenter(IAfterSaleActivityView view, IAfterSaleActivityModel model){
        return new AfterSaleActivityPresenter(view, model);
    }
}
